package com.inno.subject.domain.service.impl;

import com.inno.subject.common.enums.SubjectLevelEnum;
import com.inno.subject.domain.entity.SubjectLevelBO;
import com.inno.subject.domain.service.SubjectLevelDomainService;
import org.springframework.stereotype.Service;

import java.util.ArrayList;
import java.util.LinkedList;
import java.util.List;

@Service
public class SubjectLevelDomainServiceImpl implements SubjectLevelDomainService {
    /**
     * 题目难度列表
     */
    @Override
    public List<SubjectLevelBO> queryList() {
        SubjectLevelEnum[] enums = SubjectLevelEnum.values();
        List<SubjectLevelBO> result = new ArrayList<>();
        for (SubjectLevelEnum subjectEnum : enums) {
            SubjectLevelBO bo = new SubjectLevelBO();
            bo.setCode(subjectEnum.getCode());
            bo.setDesc(subjectEnum.getDesc());
            result.add(bo);
        }
        return result;
    }
}
